
#coding:utf8

__author__='zhaoxp'

import paramiko

def ssh_connect():
    sshclient=paramiko.SSHClient()
    sshclient.load_system_host_keys()
    sshclient.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    sshclient.connect('10.99.201.34',22,'wcadmin','5t6y&U*I4')
    stdin,stdout,stderr=sshclient.exec_command('uname -a',timeout=10)
    out=stdout.read()
    err=stderr.read()
    print("command result : \n")
    print(out)
    print("command error result: \n")
    print(err)
    sshclient.close()


if __name__=='__main__':
    print 'this is usage of module paramiko'
    ssh_connect()

